<template>
    <p>这是product</p>
</template>

<script>
export default{
    watch:{
        $route(newVal,oldVal){
            console.log('newVal',newVal);
            console.log('oldVal',oldVal)
        }
    },
    methods:{
        init(){
            console.log("初始化数据,请求后台数据")
        }
    },
    mounted(){
        this.init()
        console.log("组件生命周期触发了")
        console.log("111",this.$route.params)
    }
}
</script>